package com.gxa.retail_admin.controller;

import com.gxa.common.vo.ResultVo;
import com.gxa.modules.pojo.Region;
import com.gxa.modules.pojo.Shop;
import io.swagger.annotations.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Controller
@RequestMapping("/operation/store")
@Api(value = "店铺管理Test",tags = "店铺管理接口API-刘辉")
public class ShopController {
    /**
     * 查询店铺列表接口
     */
    @ApiOperation(value = "查询店铺列表接口",notes = "店铺列表信息",httpMethod = "GET", response = ResultVo.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页码数",paramType = "query",dataType = "int",required = true),
            @ApiImplicitParam(name = "pageSize",value = "每页显示条数",paramType = "query",dataType = "int",required = true),

    })
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code = 400,message = "参数接口错误"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @GetMapping("/shop")
    @RequiresPermissions("店铺列表")
    @ResponseBody
    public ResultVo queryShopList(Integer currentPage,Integer pageSize){
        ResultVo resultVo=new ResultVo();
        return resultVo;
    }


    /**
     *查询经营中的店铺接口
     */
    @ApiOperation(value = "查询经营中的店铺接口",notes = "经营中店铺的列表信息",httpMethod = "GET", response = ResultVo.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页码数",paramType = "query",dataType = "int",required = true),
            @ApiImplicitParam(name = "pageSize",value = "每页显示条数",paramType = "query",dataType = "int",required = true),

    })
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code = 400,message = "参数接口错误"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @GetMapping("/sh_status1")
    @RequiresPermissions("店铺列表")
    @ResponseBody
    public ResultVo queryBySh_status1(Integer currentPage,Integer pageSize){
        ResultVo resultVo=new ResultVo();
        return resultVo;
    }

    /**
     *查询停业的区域接口
     */
    @ApiOperation(value = "查询停业的店铺接口",notes = "停业店铺的列表信息",httpMethod = "GET", response = ResultVo.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页码数",paramType = "query",dataType = "int",required = true),
            @ApiImplicitParam(name = "pageSize",value = "每页显示条数",paramType = "query",dataType = "int",required = true),

    })
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code = 400,message = "参数接口错误"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @GetMapping("/sh_status2")
    @RequiresPermissions("店铺列表")
    @ResponseBody
    public ResultVo queryBySh_status2(Integer currentPage,Integer pageSize){
        ResultVo resultVo=new ResultVo();
        return  resultVo;
    }

    /**
     * 搜索店铺列表信息
     */
    @ApiOperation(value = "条件搜索接口",notes = "搜索店铺列表信息",httpMethod = "GET", response = ResultVo.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页码数",paramType = "query",dataType = "int",required = true),
            @ApiImplicitParam(name = "pageSize",value = "每页显示条数",paramType = "query",dataType = "int",required = true),
    })
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code = 400,message = "参数接口错误"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @GetMapping("/searchShop")
    @RequiresPermissions("店铺列表")
    @ResponseBody
    public ResultVo searchByShop(Integer currentPage,Integer pageSize,@RequestBody Region region){
        ResultVo resultVo=new ResultVo();
        return resultVo;
    }

    /**
     *店铺列表批量开启接口
     */
    @ApiOperation(value = "店铺批量开启接口",notes = "店铺批量开启信息",httpMethod = "GET", response = ResultVo.class)
    @ApiImplicitParam(name = "ids" ,value = "选中的id",paramType = "query",dataType = "int",required = true)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code = 400,message = "参数接口错误"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @GetMapping("/openShop")
    @RequiresPermissions("店铺列表")
    @ResponseBody
    public ResultVo shopBatchOpen(String[] ids){
        ResultVo resultVo=new ResultVo();
        return resultVo;
    }

    /**
     * 店铺列表批量关闭接口
     */
    @ApiOperation(value = "店铺批量关闭接口",notes = "店铺批量关闭信息",httpMethod = "GET", response = ResultVo.class)
    @ApiImplicitParam(name = "ids" ,value = "选中的id",paramType = "query",dataType = "int",required = true)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code = 400,message = "参数接口错误"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @GetMapping("/closeShop")
    @RequiresPermissions("店铺列表")
    @ResponseBody
    public ResultVo shopBatchClose(String[] ids){
        ResultVo resultVo=new ResultVo();
        return resultVo;
    }

    /**
     *创建店铺接口
     */
    @ApiOperation(value = "创建店铺接口",notes = "创建店铺信息",httpMethod = "POST", response = ResultVo.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code = 400,message = "参数接口错误"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @PostMapping("/createShop")
    @RequiresPermissions("店铺列表")
    @ResponseBody
    public ResultVo createShop(@RequestBody @ApiParam Map map){
        ResultVo resultVo=new ResultVo();
        return resultVo;
    }

    /**
     * 店铺编辑
     */
    @ApiOperation(value = "编辑店铺接口",notes = "编辑店铺信息",httpMethod = "POST", response = ResultVo.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code = 400,message = "参数接口错误"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @PostMapping("/editShop")
    @RequiresPermissions("店铺列表")
    @ResponseBody
    public ResultVo editShop(@RequestParam Shop shop){
        ResultVo resultVo=new ResultVo();
        return resultVo;
    }

    /**
     * 修改点铺状态接口
     */
    @ApiOperation(value = "修改点铺状态接口",notes = "修改点铺状态",httpMethod = "POST", response = ResultVo.class)
    @ApiImplicitParam(name = "sh_id" ,value = "选中的id",paramType = "query",dataType = "int",required = true)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code = 400,message = "参数接口错误"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @PostMapping("/updateShop")
    @RequiresPermissions("店铺列表")
    @ResponseBody
    public ResultVo updateShop(Integer sh_id){
        ResultVo resultVo=new ResultVo();
        return resultVo;
    }


}
